/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainWindow.java
 *
 * Created on Oct 30, 2010, 12:30:33 AM
 */

package ticketmanager;

import java.awt.AWTException;
import java.awt.CheckboxMenuItem;
import java.awt.Image;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.TrayIcon.MessageType;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Viktor
 */
public class MainWindow extends javax.swing.JFrame {
    public TrayIcon trayIco = null;
    private Integer refreshRate = 60;
    private boolean connected = false;
    private boolean enabled_notification = true;
    private GoogleTranslator translator; // translator object
    private TextProcessor txtproc = new TextProcessor(); // text processor object


    CheckboxMenuItem startItem;
    CheckboxMenuItem toggleNotification;
    
    public static final int IDLE_STATE = 0;
    public static final int NEW_TICKETS = 1;
    public static final int CONNECTION_LOST = 2;

    ActionListener baloonListener = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(!MainWindow.this.isVisible())
                    MainWindow.this.setVisible(true);
                else
                    MainWindow.this.toFront();
            }
    };

    /** Creates new form MainWindow */
    public MainWindow() {
        //Set platform default look and feel
        
        initComponents();
        initTray();
        translator = new GoogleTranslator();


        this.setIconImage(Toolkit.getDefaultToolkit().getImage("lt_icon.png"));
        this.descriptionFrame.setIconImage(Toolkit.getDefaultToolkit().getImage("lt_icon.png"));
        this.reloadRateLabel.setText("Reload rate: " + (this.refreshRate/60) + " minute(s);");
    }

    private void initTray() {
        //Check if tray icon supported
        if (SystemTray.isSupported()) {
            SystemTray tray = SystemTray.getSystemTray();
            Image image = Toolkit.getDefaultToolkit().getImage("icon_grey_new.png");

        ActionListener quitListener = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("Exiting...");
                System.exit(0);
            }
        };




        final PopupMenu popup = new PopupMenu();
        startItem = new CheckboxMenuItem("Pause");
        startItem.addItemListener(new ItemListener() {
                // item listener for 'Paused' check box in tray
                public void itemStateChanged(ItemEvent e) {
                     Main.setPause(startItem.getState());
                     if (Main.getPaused())
                       {
                             pauseUnpause.setText("Resume");

                        }
                        else
                        {
                             pauseUnpause.setText("Pause");
                        }

                  }}
             );


            popup.add(startItem);

        toggleNotification = new CheckboxMenuItem("Disable Notification");
          
            // Item listener for tray checkbox

            toggleNotification.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                enabled_notification = !toggleNotification.getState();
                }
            });

            
            popup.add(toggleNotification);

            // open aplication action listener for tray button

          MenuItem openAppItem = new MenuItem("Open Application");
        openAppItem.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                if(!MainWindow.this.isVisible())
                    MainWindow.this.setVisible(true);
                else
                    MainWindow.this.toFront();
                }
            });

        popup.add(openAppItem);







        MenuItem exitItem = new MenuItem("Quit Application");
        exitItem.addActionListener(quitListener);
        popup.add(exitItem);


        trayIco = new TrayIcon(image, "Lucky Ticket", popup);
        trayIco.setImageAutoSize(false);

        trayIco.addActionListener(baloonListener);

        try {
            tray.add(trayIco);
        } catch (AWTException e) {
            System.err.println("TrayIcon could not be added.");
        }

        } else {
            System.out.println("Warning: System tray is upsupported!");
            MainWindow.this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        }
    }

    public Integer getRefreshRate() {
        return refreshRate;
    }



    // added 'time remaining'
    // method separates minutes and seconds and sets new value to label
    public void showTimeRemaining(int aSeconds)
    {
        int minutes = aSeconds / 60;
        int seconds = aSeconds % 60;

        String remaining = minutes +":" + seconds;
        timeRemainingLabel.setText("Time until next update: "+remaining);

    }

    public synchronized void setRefreshRate(Integer refreshRate) {
        this.refreshRate = refreshRate;
        this.reloadRateLabel.setText("Reload rate: " + (getRefreshRate()/60) + " minutes;");
    }

    public synchronized void updateTicketTable(List<Ticket> ticketList) {
        DefaultTableModel model = (DefaultTableModel)ticketTable.getModel();

        setTicketCountLabel(ticketList.size());
        model.setRowCount(ticketList.size());
        for (int i = 0;i < ticketList.size();i++) {
            if (ticketList.get(i).getFollow())
                ticketTable.setValueAt(Ticket.FOLLOW_UP, i, 0);
            ticketTable.setValueAt(ticketList.get(i).getRowID(), i, 1);
            ticketTable.setValueAt(ticketList.get(i).getStatus(), i, 2);
            ticketTable.setValueAt(ticketList.get(i).getSolver(), i, 3);
            ticketTable.setValueAt(ticketList.get(i).getTitle(), i, 4);
            ticketTable.setValueAt(ticketList.get(i).getCategory(), i, 5);
            ticketTable.setValueAt(ticketList.get(i).getDescription(), i, 6);
        }
    }

    public List<Ticket> retrieveTicketTable() {
        List<Ticket> ticketList = new ArrayList<Ticket>();

        if (ticketTable.getRowCount() == 0)
            return new ArrayList<Ticket>(ticketList);

        for (int i = 0;i < ticketTable.getRowCount();i++) {
            Ticket ticket = new Ticket();
            if (ticketTable.getValueAt(i, 0) == null)
                ticket.setFollow(false);
            else
                ticket.setFollow(true);
            ticket.setRowID((String)ticketTable.getValueAt(i, 1));
            ticket.setStatus((String)ticketTable.getValueAt(i, 2));
            ticket.setSolver((String)ticketTable.getValueAt(i, 3));
            ticket.setTitle((String)ticketTable.getValueAt(i, 4));
            ticket.setCategory((String)ticketTable.getValueAt(i, 5));
            ticket.setDescription((String)ticketTable.getValueAt(i, 6));
            ticket.setFresh(false);

            ticketList.add(ticket);
        }

        return new ArrayList<Ticket>(ticketList);
    }

    public void setConnectionStatusLabel(String status) {
        this.connectionStatusLabel.setText("Connection status: " + status);
    }

    private void setTicketCountLabel(Integer count) {
        this.ticketCountLabel.setText("Ticket count: " + count);
    }

    public void setTrayIconImage(int state) {
        switch (state) {
            case (0): {
                trayIco.setImage(Toolkit.getDefaultToolkit().getImage("icon_blue_new.png"));
                break;
            }
            case (1): {
                trayIco.setImage(Toolkit.getDefaultToolkit().getImage("icon_green_new.png"));
                break;
            }
            case (2): {
                trayIco.setImage(Toolkit.getDefaultToolkit().getImage("icon_red_new.png"));
                break;
            }
            default: {
                trayIco.setImage(Toolkit.getDefaultToolkit().getImage("icon_blue_new.png"));
                break;
            }
        }
    }

    public void setConnected(Boolean connected) {
        this.connected = connected;
    }

    public Boolean getConnected() {
        return this.connected;
    }

    // added check for notification enabled
    public void displayTicketsBaloon(Integer newTicketCount) {
        if (SystemTray.isSupported() && enabled_notification) {
            if (newTicketCount == 1)
                trayIco.displayMessage("You have new ticket", "There is " + newTicketCount + " new ticket!", MessageType.INFO);
            else
                trayIco.displayMessage("You have new tickets", "There are " + newTicketCount + " new tickets!", MessageType.INFO);
        }
    }

    public void displayInfoBaloon(int state) {
        if (SystemTray.isSupported() && enabled_notification) {
            if (state == MainWindow.CONNECTION_LOST)
                trayIco.displayMessage("Lucky ticket", "Database connection lost!", MessageType.WARNING);
            else
                trayIco.displayMessage("Lucky Ticket", "Database connection renewed!", MessageType.INFO);
        }
    }

    public void setLockTable(Boolean locked) {
            ticketTable.setEnabled(!locked);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        descriptionFrame = new javax.swing.JFrame();
        descTabbedPane = new javax.swing.JTabbedPane();
        jScrollPane2 = new javax.swing.JScrollPane();
        Original = new javax.swing.JTextArea();
        jScrollPane3 = new javax.swing.JScrollPane();
        Translated = new javax.swing.JTextArea();
        jScrollPane1 = new javax.swing.JScrollPane();
        ticketTable = new javax.swing.JTable();
        reloadRateLabel = new javax.swing.JLabel();
        connectionStatusLabel = new javax.swing.JLabel();
        ticketCountLabel = new javax.swing.JLabel();
        unfollowButton = new javax.swing.JButton();
        timeRemainingLabel = new javax.swing.JLabel();
        UpdateForceButton = new javax.swing.JButton();
        pauseUnpause = new javax.swing.JButton();
        mainMenu = new javax.swing.JMenuBar();
        systemMenu = new javax.swing.JMenu();
        quitItem = new javax.swing.JMenuItem();
        settingsMenu = new javax.swing.JMenu();
        reloadMenu = new javax.swing.JMenu();
        itemOneMin = new javax.swing.JMenuItem();
        itemThreeMin = new javax.swing.JMenuItem();
        itemFiveMin = new javax.swing.JMenuItem();
        itemTenMin = new javax.swing.JMenuItem();

        descriptionFrame.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        descriptionFrame.setTitle("Description");
        descriptionFrame.setLocationByPlatform(true);
        descriptionFrame.setMinimumSize(new java.awt.Dimension(500, 600));

        Original.setColumns(20);
        Original.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Original.setLineWrap(true);
        Original.setRows(5);
        jScrollPane2.setViewportView(Original);

        descTabbedPane.addTab("Original", jScrollPane2);

        Translated.setColumns(20);
        Translated.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        Translated.setLineWrap(true);
        Translated.setRows(5);
        jScrollPane3.setViewportView(Translated);

        descTabbedPane.addTab("Translated", jScrollPane3);

        javax.swing.GroupLayout descriptionFrameLayout = new javax.swing.GroupLayout(descriptionFrame.getContentPane());
        descriptionFrame.getContentPane().setLayout(descriptionFrameLayout);
        descriptionFrameLayout.setHorizontalGroup(
            descriptionFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(descTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
        );
        descriptionFrameLayout.setVerticalGroup(
            descriptionFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(descTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)
        );

        setTitle("Lucky Ticket");
        setLocationByPlatform(true);
        setResizable(false);
        addWindowFocusListener(new java.awt.event.WindowFocusListener() {
            public void windowGainedFocus(java.awt.event.WindowEvent evt) {
                formWindowGainedFocus(evt);
            }
            public void windowLostFocus(java.awt.event.WindowEvent evt) {
            }
        });

        ticketTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Follow/Unfollow", "Ticket ID", "Status", "Solver", "Title", "Category", "Description"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        ticketTable.setRowHeight(16);
        ticketTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        ticketTable.getTableHeader().setReorderingAllowed(false);
        ticketTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                ticketTableMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(ticketTable);

        reloadRateLabel.setText("Reload rate:");

        connectionStatusLabel.setText("Connection status: Disconnected");

        ticketCountLabel.setText("Ticket count: Unknown");

        unfollowButton.setText("Unfollow All");
        unfollowButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                unfollowButtonMouseReleased(evt);
            }
        });

        timeRemainingLabel.setText("Time until next update:");

        UpdateForceButton.setText("Force update");
        UpdateForceButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                UpdateForceButtonMouseClicked(evt);
            }
        });

        pauseUnpause.setText("Pause");
        pauseUnpause.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pauseUnpauseMouseClicked(evt);
            }
        });

        systemMenu.setText("System");

        quitItem.setText("Quit");
        quitItem.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                quitItemMouseReleased(evt);
            }
        });
        systemMenu.add(quitItem);

        mainMenu.add(systemMenu);

        settingsMenu.setText("Settings");

        reloadMenu.setText("Reload Rate");

        itemOneMin.setText("1 Minute");
        itemOneMin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                itemOneMinMouseReleased(evt);
            }
        });
        reloadMenu.add(itemOneMin);

        itemThreeMin.setText("3 Minutes");
        itemThreeMin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                itemThreeMinMouseReleased(evt);
            }
        });
        reloadMenu.add(itemThreeMin);

        itemFiveMin.setText("15 Seconds");
        itemFiveMin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                itemFiveMinMouseReleased(evt);
            }
        });
        reloadMenu.add(itemFiveMin);

        itemTenMin.setText("30 Seconds");
        itemTenMin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                itemTenMinMouseReleased(evt);
            }
        });
        reloadMenu.add(itemTenMin);

        settingsMenu.add(reloadMenu);

        mainMenu.add(settingsMenu);

        setJMenuBar(mainMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(unfollowButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(UpdateForceButton, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pauseUnpause)
                .addContainerGap(328, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(ticketCountLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(reloadRateLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(timeRemainingLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 125, Short.MAX_VALUE)
                .addComponent(connectionStatusLabel)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 316, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(unfollowButton)
                    .addComponent(UpdateForceButton)
                    .addComponent(pauseUnpause))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ticketCountLabel)
                    .addComponent(connectionStatusLabel)
                    .addComponent(reloadRateLabel)
                    .addComponent(timeRemainingLabel)))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void quitItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_quitItemMouseReleased
        // TODO add your handling code here:
        if(evt.getButton() == 1) {
            System.exit(0);
        }
    }//GEN-LAST:event_quitItemMouseReleased

    private void itemOneMinMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_itemOneMinMouseReleased
        // TODO add your handling code here:
        setRefreshRate(60);
    }//GEN-LAST:event_itemOneMinMouseReleased

    private void itemThreeMinMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_itemThreeMinMouseReleased
        // TODO add your handling code here:
        setRefreshRate(180);
    }//GEN-LAST:event_itemThreeMinMouseReleased

    private void itemFiveMinMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_itemFiveMinMouseReleased
        // TODO add your handling code here:
        setRefreshRate(15);
    }//GEN-LAST:event_itemFiveMinMouseReleased

    private void itemTenMinMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_itemTenMinMouseReleased
        // TODO add your handling code here:
        setRefreshRate(30);
    }//GEN-LAST:event_itemTenMinMouseReleased

    private void ticketTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ticketTableMouseClicked
        // TODO add your handling code here:
        if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) {
            if (this.ticketTable.getSelectedColumn() == 0)
                if (this.ticketTable.getValueAt(this.ticketTable.getSelectedRow(), 0) == null) {
                    this.ticketTable.setValueAt(Ticket.FOLLOW_UP, this.ticketTable.getSelectedRow(), 0);
                }
                else {
                    this.ticketTable.setValueAt(null, this.ticketTable.getSelectedRow(), 0);
                }
            if (this.ticketTable.getSelectedColumn() == 1) {

                Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
                String selection = (String)ticketTable.getValueAt(ticketTable.getSelectedRow(), 1);
                StringSelection data = new StringSelection(selection);

                clipboard.setContents(data, data);

                

            }

            // setting original and translated text values to Description frame tabs
            //also is used text formatting for better visibility
            if (this.ticketTable.getSelectedColumn() == 6) {
                descriptionFrame.setVisible(true);

                Original.setText(txtproc.ReplaceSequence("----==Title==----\n" +
                        (String) ticketTable.getValueAt(ticketTable.getSelectedRow(), 4),"**", "\n") + "\n\n" +
                    "----==Description==----\n" + txtproc.ReplaceSequence((String) ticketTable.getValueAt(ticketTable.getSelectedRow(), 6),"**", "\n"));
                try {
                    Translated.setText("----==Title==----\n" + txtproc.ReplaceSequence(translator.translate((String) ticketTable.getValueAt(ticketTable.getSelectedRow(), 4)),"**", "\n") + "\n\n" +
                            "----==Description==----\n" + txtproc.ReplaceSequence(translator.translate((String) ticketTable.getValueAt(ticketTable.getSelectedRow(), 6)),"**", "\n"));
                             } catch (Exception ex) {
                    Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);
                }

                // reseting caretp positiion to begin
                Original.setCaretPosition(0);
                Translated.setCaretPosition(0);

            }
        }
    }//GEN-LAST:event_ticketTableMouseClicked

    private void unfollowButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_unfollowButtonMouseReleased
        // TODO add your handling code here:
        if (ticketTable.isEnabled()) {
            if (this.ticketTable.getRowCount() > 0)
                for (int i = 0;i < ticketTable.getRowCount();i++)
                    ticketTable.setValueAt(null, i, 0);
        }
    }//GEN-LAST:event_unfollowButtonMouseReleased

    private void formWindowGainedFocus(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowGainedFocus
        // TODO add your handling code here:
        if (getConnected())
            this.setTrayIconImage(MainWindow.IDLE_STATE);
    }//GEN-LAST:event_formWindowGainedFocus

    private void UpdateForceButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_UpdateForceButtonMouseClicked
        // TODO add your handling code here:

        Main.updateForce();


    }//GEN-LAST:event_UpdateForceButtonMouseClicked

    private void pauseUnpauseMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pauseUnpauseMouseClicked
        // TODO add your handling code here:
        Main.PauseUnpause();

             // checking pause state, setting button caption and tray checkbox state regarding
             if (Main.getPaused())
                        {
                            pauseUnpause.setText("Resume");
                            startItem.setState(true);
                        }
                        else
                        {
                            pauseUnpause.setText("Pause");
                            startItem.setState(false);
                        }


    }//GEN-LAST:event_pauseUnpauseMouseClicked

    /**
    * @param args the command line arguments
    */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea Original;
    private javax.swing.JTextArea Translated;
    private javax.swing.JButton UpdateForceButton;
    private javax.swing.JLabel connectionStatusLabel;
    private javax.swing.JTabbedPane descTabbedPane;
    private javax.swing.JFrame descriptionFrame;
    private javax.swing.JMenuItem itemFiveMin;
    private javax.swing.JMenuItem itemOneMin;
    private javax.swing.JMenuItem itemTenMin;
    private javax.swing.JMenuItem itemThreeMin;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JMenuBar mainMenu;
    private javax.swing.JButton pauseUnpause;
    private javax.swing.JMenuItem quitItem;
    private javax.swing.JMenu reloadMenu;
    private javax.swing.JLabel reloadRateLabel;
    private javax.swing.JMenu settingsMenu;
    private javax.swing.JMenu systemMenu;
    private javax.swing.JLabel ticketCountLabel;
    private javax.swing.JTable ticketTable;
    private javax.swing.JLabel timeRemainingLabel;
    private javax.swing.JButton unfollowButton;
    // End of variables declaration//GEN-END:variables

}
